/**
 * AreaDao.java
 * Created at 2017-07-06
 * Created by Jackie liu
 * Copyright (C) 2014, All rights reserved.
 */
package com.huabo.dao.inter;

import com.huabo.base.BaseDao;
import com.huabo.model.Area;
import com.huabo.utils.Page;

import java.util.List;
import java.util.Map;

/**
 * <p>ClassName: AreaDao</p>
 * <p>Description: 区域管理Dao</p>
 * <p>Author: Jackie liu</p>
 * <p>Date: 2017-07-06</p>
 */
public interface AreaDao extends BaseDao<Area, Long> {

    public Page<Area> queryPage(Map<String, Object> params);

    public int batchRemove(Long[] ids);

    public int modifyState(int state, Long[] ids);

    public List<Area> query(Map<String, Object> params);

    public boolean isDuplicateCode(Long id, String code);

    public boolean isDuplicateName(Long id, String name, Long parentId);

    public List<Area> queryRootList(Map<String, Object> params);

    public List<Area> querySecondList(Long parentId, int state);
}